In existing computer architectures that support exception handling, performing exception handling is usually an expensive proposition. Typically, the processor operates in user mode and checks values or pointers for soundness. For example, the processor may check to verify whether a user mode process has permission to access an address that requires kernel privilege level. If the check fails, an exception is thrown and the processor handles the exception by switching from user mode to kernel mode and performing operations such as checking for privilege level in the kernel mode. Often, the processor also switches from kernel mode back to user mode to carry out additional exception handling tasks, such as sending signals to the main process/user indicating that the check has failed. Mode switching requires many processing cycles and is therefore expensive.
In computer environments that support garbage collection, the cost of exception handling is more pronounced since conditions related to garbage collection often require frequent checks, and a large number of exceptions may result. The overhead associated with exception handling can significantly impact the performance of the system. It would be desirable to have a better way to handle exceptional conditions. It would be useful to if exceptional conditions related to garbage collection could be handled without significantly impacting system performance.